package com.mf.controller;

import com.mf.entity.User;
import com.mf.result.Result;
import com.mf.service.IUserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: lmf
 * @Create: 2024/6/26 16:03
 * Description:
 */
@RestController
@RequestMapping("/user")
@Tag(name = "用户")
@Slf4j
public class UserController {
    @Resource
    private  IUserService userService;

    @Operation(summary = "list")
    @GetMapping("list")
    public Result<List<User>> list() {
        return Result.success(userService.list());
    }


}
